import request from '@/utils/request'

// 查询可添加学生列表（根据部门查询）
export function selectStudentUserByDeptId() {
  return request({
    url: '/schedule/schedule/selectStudentUserByDeptId',
    method: 'get'
  })
}

// 课程添加学生
export function addStudent(data) {
  return request({
    url: '/schedule/schedule/addStudent',
    method: 'post',
    data: data
  })
}
// 删除课程学生
export function deleteStudent(query) {
  return request({
    url: '/schedule/schedule/deleteStudent',
    method: 'get',
    params: query
  })
}
// 查询课程学生
export function studentListByCourseId(query) {
  return request({
    url: '/schedule/schedule/studentListByCourseId',
    method: 'get',
    params: query
  })
}
// 查询课程管理列表
export function listSchedule(query) {
  return request({
    url: '/schedule/schedule/list',
    method: 'get',
    params: query
  })
}

// 查询课程管理详细
export function getSchedule(courseId) {
  return request({
    url: '/schedule/schedule/' + courseId,
    method: 'get'
  })
}

// 新增课程管理
export function addSchedule(data) {
  return request({
    url: '/schedule/schedule',
    method: 'post',
    data: data
  })
}

// 修改课程管理
export function updateSchedule(data) {
  return request({
    url: '/schedule/schedule',
    method: 'put',
    data: data
  })
}

// 删除课程管理
export function delSchedule(courseId) {
  return request({
    url: '/schedule/schedule/' + courseId,
    method: 'delete'
  })
}
